home *** CD-ROM | disk | FTP | other *** search
- /*
- File: PGCommon.h
-
- Contains: Common definitions for the polygon clipper.
-
- Written by: Jens Alfke (based on algorithm by A. C. Kilgour)
-
- Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <2> 12/5/94 jpa Code review fixes. [1203923]
- <1> 6/15/94 jpa first checked in
- ---------------------------Moved to ODSOM project.
- <1> 5/9/94 jpa first checked in
- */
-
-
- #ifndef _PGCOMMON_
- #define _PGCOMMON_
-
- #ifndef _ODTYPES_
- #include "ODTypes.h"
- #endif
-
- #ifndef _EXCEPT_
- #include "Except.h"
- #endif
-
-
- //=============================================================================
- // Debugging
- //=============================================================================
-
- #ifdef __MWERKS__
- #undef PROFILING
- #define PROFILING 0 /* 1 enables Metrowerks profiling, 0 disables it*/
- #endif
-
- #if PROFILING
- #pragma profile on
- #define LOGGING 0 /* Never log while profiling*/
- #else
- // #undef LOGGING
- // #define LOGGING 0 /* 1 enables logging, 0 disables it*/
- #endif
-
- #define BEGINLOG
- #define ENDLOG
-
- #define kPGAssertionFailed 7734
-
- #if LOGGING
- #define PGASSERT(COND) WASSERT(COND)
- #else
- #define PGASSERT(COND) ASSERT(COND,kODErrAssertionFailed)
- #endif
-
-
- //=============================================================================
- // Constants & Types
- //=============================================================================
-
-
- typedef enum {
- kNegative = -1,
- kZero = 0,
- kPositive = 1
- } PGSense;
-
-
- typedef enum {
- kLeft = -1,
- kOnTop = 0,
- kRight = 1
- } PGSide;
-
-
- //=============================================================================
- // Globals
- //=============================================================================
-
-
- class PGContourList;
-
-
- extern ODSLong gMinWrap, gMaxWrap; // Min/max wrap desired for output
-
- extern PGContourList *gOutputContours; // GLOBAL: Collects output contours
-
-
- #endif /*_PGCOMMON*/